<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>用户资料预览</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th>帐号属性</th>
                      <th>值</th>                         
                  </tr>
              </thead>   
              <tbody>
                <tr>
                    <td>帐号：</td>
                    <td class="center"><?php echo $user->getUserName(); ?></td>                           
                </tr>    
                <tr>
                    <td>性别：</td>
                    <td class="center"><?php echo User::$sex_label[$user->getSex()]; ?></td>                           
                </tr>
                <tr>
                    <td>年龄：</td>
                    <td class="center"><?php echo ($user->getAge() == 0) ? '未知' : $user->getAge(); ?></td>                           
                </tr>
                <tr>
                    <td>角色：</td>
                    <td class="center"><?php echo User::$role_label[$user->getRole()]; ?></td>                           
                </tr>
                <tr>
                    <td>注册来源：</td>
                    <td class="center"><?php echo $user->getRegFrom(); ?></td>                           
                </tr>
                <?php foreach(UserAttr::$attr_label as $key => $label): ?>
                <tr>
                    <td><?php echo $label; ?></td>
                    <td class="center"><?php echo ($user->getAttrValueByName($key) == 0 ) ? '' : $user->getAttrValueByName($key); ?></td>                           
                </tr>     
                <?php endforeach; ?>
              </tbody>
         </table>     
    </div>
</div>
</div>
<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>用户账户</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <table class="table table-bordered table-striped table-condensed">
<!--              <thead>
                  <tr>
                      <th></th>
                      <th></th> 
                      <th>剩余限额</th>
                      <th>充值总数</th>
                      <th>余额</th>
<th>已投资数额</th>
<th>利息总数</th>
                  </tr>
              </thead>   
              <tbody>-->
                <tr>
                    <td>用户额度：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getQuota(),2); ?></td>                           
                </tr>
                <tr>
                    <td>已经使用额度：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getUseQuota(),2) ?></td>                           
                </tr>
                <tr>
                    <td>剩余限额：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getSurplusQuota(),2); ?></td>                           
                </tr>
                <tr>
                    <td>充值总数：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getRecharge(),2); ?></td>                           
                </tr>
                <tr>
                    <td>余额：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getRemainingMoney(),2); ?></td>                           
                </tr>
                <tr>
                    <td>投资总数：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getInvestment(),2); ?></td>                           
                </tr>
                <tr>
                    <td>用户额度：</td>
                    <td class="center"><?php echo number_format($user->getAccount()->getInterest(),2); ?></td>                           
                </tr>
              <!--</tbody>-->
         </table>     
    </div>
</div>
</div>
<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>用户投标记录</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th>标题</th>
                      <th>投资金额[元]</th> 
                      <th>投资时间</th>
                      <th>标状态</th>
                      <th>投资状态</th>
                  </tr>
              </thead>   
              <tbody>
                <?php foreach($loan_record as $record): ?>
                <tr>
                    <td><?php echo $record->getLoan()->getTitle(); ?></td>
                    <td class="center"><?php echo number_format($record->getLoanMoney(),2); ?></td>        
                    <td><?php echo $record->getDateTimeObject('created_at')->format('Y-m-d H:i:s'); ?></td>
                    <td><span class="label <?php echo $record->getLoan()->getStatusToClassName(); ?>"><?php echo Loan::$status[$record->getLoan()->getStatusAndChange()]; ?></span></td>
                    <td><span class="label <?php if($record->getStatus() == 0): ?>label-success<?php else: ?>label-important<?php endif ?>"><?php echo LoanRecord::$status[$record->getStatus()]; ?></span></td>
                </tr>     
                <?php endforeach; ?>
              </tbody>
         </table>     
    </div>
</div>
</div>